<template>
  <div id="main-tab-bar">
    <tab-bar>
      <tab-bar-item path="/home">
        <template v-slot:item_img>
          <img src="@assets/img/tabbar/home.svg" alt="" />
        </template>
        <template v-slot:item_img_active>
          <img src="@assets/img/tabbar/home_active.svg" alt="" />
        </template>
        <template v-slot:item_text>
          <div>首页</div>
        </template>
      </tab-bar-item>
      <tab-bar-item path="/cart">
        <template v-slot:item_img>
          <img src="@assets/img/tabbar/cart.svg" alt="" />
        </template>
        <template v-slot:item_img_active>
          <img src="@assets/img/tabbar/cart_active.svg" alt="" />
        </template>
        <template v-slot:item_text>
          <div>购物车</div>
        </template>
      </tab-bar-item>
      <tab-bar-item path="/category">
        <template v-slot:item_img>
          <img src="@assets/img/tabbar/category.svg" alt="" />
        </template>
        <template v-slot:item_img_active>
          <img src="@assets/img/tabbar/category_active.svg" alt="" />
        </template>
        <template v-slot:item_text>
          <div>分类</div>
        </template>
      </tab-bar-item>
      <tab-bar-item path="/profile">
        <template v-slot:item_img>
          <img src="@assets/img/tabbar/profile.svg" alt="" />
        </template>
        <template v-slot:item_img_active>
          <img src="@assets/img/tabbar/profile_active.svg" alt="" />
        </template>
        <template v-slot:item_text>
          <div>我的</div>
        </template>
      </tab-bar-item>
    </tab-bar>
  </div>
</template>

<script>
const tabBar = () => import("@components/common/tabbar/TabBar");
const tabBarItem = () => import("@components/common/tabbar/TabBarItem");
export default {
  name: "mainTabBar",
  components: {
    tabBar,
    tabBarItem,
  },
};
</script>

<style>
#main-tab-bar {
  position: fixed;
  z-index: 4;
}
</style>